
const { sequelize, DataTypes } = require('../utill/getSequelize')

//学年表
const T_question_score = sequelize.define('T_question_score', {

    id: {
        type: DataTypes.INTEGER,
        primaryKey: true,
        autoIncrement: true,
    },

    judgeQuestions: {
        type: DataTypes.INTEGER,
        defaultValue: 5
    },

    //标记
    t_user_and_a_c_s_id: {
        type: DataTypes.INTEGER,
        allowNull: false,
    },

    subjectId: {
        type: DataTypes.INTEGER
    },

    oneChoiceQuestions: {
        type: DataTypes.INTEGER,
        defaultValue: 5
    },

    multipleChoiceQuestions: {
        type: DataTypes.INTEGER,
        defaultValue: 5
    },

    fillBlankQuestions: {
        type: DataTypes.INTEGER,
        defaultValue: 5
    },



}, {
    underscored: true
});


//同步模型和数据库表
(async () => {
    try {
        await sequelize.sync({ force: false });
        console.log('All models were synchronized successfully.');
    } catch (error) {
        console.log(error);
    }

})();

//提供出去
module.exports = { T_question_score };